home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / mipsABI / examples / sup / supmsg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  5.7 KB  |  192 lines

  1. /*
  2.  * Copyright (c) 1992 Carnegie Mellon University
  3.  * All Rights Reserved.
  4.  * 
  5.  * Permission to use, copy, modify and distribute this software and its
  6.  * documentation is hereby granted, provided that both the copyright
  7.  * notice and this permission notice appear in all copies of the
  8.  * software, derivative works or modified versions, and any portions
  9.  * thereof, and that both notices appear in supporting documentation.
  10.  *
  11.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  12.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  13.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  14.  *
  15.  * Carnegie Mellon requests users of this software to return to
  16.  *
  17.  *  Software Distribution Coordinator  or  Software_Distribution@CS.CMU.EDU
  18.  *  School of Computer Science
  19.  *  Carnegie Mellon University
  20.  *  Pittsburgh PA 15213-3890
  21.  *
  22.  * any improvements or extensions that they make and grant Carnegie Mellon
  23.  * the rights to redistribute these changes.
  24.  */
  25. /*
  26.  * supmsg.h - global definitions/variables used in msg routines.
  27.  *
  28.  **********************************************************************
  29.  * HISTORY
  30.  *
  31.  * 7-July-93  Nate Williams at Montana State University
  32.  *    Modified SUP to use gzip based compression when sending files
  33.  *    across the network to save BandWidth
  34.  *
  35.  * $Log: supmsg.h,v $
  36.  * Revision 1.2  1993/08/04  17:46:24  brezak
  37.  * Changes from nate for gzip'ed sup
  38.  *
  39.  * Revision 1.1.1.1  1993/05/21  14:52:19  cgd
  40.  * initial import of CMU's SUP to NetBSD
  41.  *
  42.  * Revision 1.7  92/08/11  12:08:20  mrt
  43.  *     Added copyright.
  44.  *     [92/08/10            mrt]
  45.  * 
  46.  * Revision 1.6  89/08/23  14:56:42  gm0w
  47.  *     Changed MSGF to MSG constants.
  48.  *     [89/08/23            gm0w]
  49.  * 
  50.  * 27-Dec-87  Glenn Marcy (gm0w) at Carnegie-Mellon University
  51.  *    Added crosspatch support.  Removed nameserver support.
  52.  *
  53.  * 29-Jun-87  Glenn Marcy (gm0w) at Carnegie-Mellon University
  54.  *    Added "release" support.
  55.  *
  56.  * 27-May-87  Doug Philips (dwp) at Carnegie-Mellon University
  57.  *    Added MSGFDONE and subvalues, added doneack and donereason.
  58.  *
  59.  * 20-May-87  Glenn Marcy (gm0w) at Carnegie-Mellon University
  60.  *    Added changes to make lint happy.
  61.  *
  62.  * 04-Jan-86  Glenn Marcy (gm0w) at Carnegie-Mellon University
  63.  *    Changed hostname to hostT to support multiple repositories per
  64.  *    collection.  Added FSETUPBUSY to tell clients that server is
  65.  *    currently busy.
  66.  *
  67.  * 19-Dec-85  Glenn Marcy (gm0w) at Carnegie-Mellon University
  68.  *    Created.
  69.  *
  70.  **********************************************************************
  71.  */
  72.  
  73. /* Special messages reserved for SCM */
  74. #define MSGGOAWAY    (-1)        /* see scm.c */
  75.  
  76. /* Message types -- see supmsg.c */
  77. #define MSGSIGNON    (101)
  78. #define MSGSIGNONACK    (102)
  79. #define MSGSETUP    (103)
  80. #define MSGSETUPACK    (104)
  81. #define MSGLOGIN    (105)
  82. #define MSGLOGACK    (106)
  83. #define MSGCRYPT    (107)
  84. #define MSGCRYPTOK    (108)
  85. #define MSGREFUSE    (109)
  86. #define MSGLIST        (110)
  87. #define MSGNEED        (111)
  88. #define MSGDENY        (112)
  89. #define MSGSEND        (113)
  90. #define MSGRECV        (114)
  91. #define MSGDONE        (115)
  92. #define MSGXPATCH    (117)
  93. #define MSGCOMPRESS    (118)
  94.  
  95. /* MSGSETUPACK data codes - setupack */
  96. #define FSETUPOK    (999)
  97. #define FSETUPHOST    (998)
  98. #define FSETUPSAME    (997)
  99. #define FSETUPOLD    (996)
  100. #define FSETUPBUSY    (995)
  101. #define FSETUPRELEASE    (994)
  102.  
  103. /* MSGLOGACK data codes - loginack */
  104. #define FLOGOK        (989)
  105. #define FLOGNG        (988)
  106.  
  107. /* MSGDONE data codes - doneack */
  108. #define FDONESUCCESS    (979)
  109. #define FDONEDONTLOG    (978)
  110. #define FDONESRVERROR    (977)
  111. #define FDONEUSRERROR    (976)
  112. #define FDONEGOAWAY    (975)
  113.  
  114. #ifdef    MSGSUBR
  115.  
  116. /* used in all msg routines */
  117. extern int    server;            /* true if we are the server */
  118. extern int    protver;        /* protocol version of partner */
  119.  
  120. #else    MSGSUBR
  121.  
  122. #ifdef    MSGFILE
  123. #define    EXTERN
  124. #else    MSGFILE
  125. #define    EXTERN    extern
  126. #endif    MSGFILE
  127.  
  128. /* used in all msg routines */
  129. EXTERN    int    server;            /* true if we are the server */
  130.  
  131. /* msggoaway */
  132. EXTERN    char    *goawayreason;        /* reason for goaway */
  133.  
  134. /* msgsignon */
  135. EXTERN    int    pgmversion;        /* version of this program */
  136. EXTERN    int    protver;        /* protocol version of partner */
  137. EXTERN    int    pgmver;            /* program version of partner */
  138. EXTERN    char    *scmver;        /* scm version of partner */
  139. EXTERN    int    fspid;            /* process id of fileserver */
  140.  
  141. /* msgsetup */
  142. EXTERN    int    xpatch;            /* setup crosspatch to a new client */
  143. EXTERN    char    *xuser;            /* user for crosspatch */
  144. EXTERN    char    *collname;        /* collection name */
  145. EXTERN    char    *basedir;        /* base directory */
  146. EXTERN    int    basedev;        /* base directory device */
  147. EXTERN    int    baseino;        /* base directory inode */
  148. EXTERN    long    lasttime;        /* time of last upgrade */
  149. EXTERN    int    listonly;        /* only listing files, no data xfer */
  150. EXTERN    int    newonly;        /* only send new files */
  151. EXTERN    char    *release;        /* release name */
  152. EXTERN    int    setupack;        /* ack return value for setup */
  153.  
  154. /* msgcrypt */
  155. EXTERN    char    *crypttest;        /* encryption test string */
  156.  
  157. /* msglogin */
  158. EXTERN    char    *logcrypt;        /* login encryption test */
  159. EXTERN    char    *loguser;        /* login username */
  160. EXTERN    char    *logpswd;        /* password for login */
  161. EXTERN    int    logack;            /* login ack status */
  162. EXTERN    char    *logerror;        /* error string from oklogin */
  163.  
  164. /* msgxpatch */
  165. EXTERN    int    xargc;            /* arg count for crosspatch */
  166. EXTERN    char    **xargv;        /* arg array for crosspatch */
  167.  
  168. /* msgrefuse */
  169. EXTERN    TREE    *refuseT;        /* tree of files to refuse */
  170.  
  171. /* msglist */
  172. EXTERN    TREE    *listT;            /* tree of files to list */
  173. EXTERN    long    scantime;        /* time that collection was scanned */
  174.  
  175. /* msgneed */
  176. EXTERN    TREE    *needT;            /* tree of files to need */
  177.  
  178. /* msgdeny */
  179. EXTERN    TREE    *denyT;            /* tree of files to deny */
  180.  
  181. /* msgrecv */
  182. /* msgsend */
  183. EXTERN    TREE    *upgradeT;        /* pointer to file being upgraded */
  184.  
  185. /* msgdone */
  186. EXTERN    int    doneack;        /* done ack status */
  187. EXTERN    char     *donereason;        /* set if indicated by doneack */
  188.  
  189. #undef    EXTERN
  190.  
  191. #endif    MSGSUBR
  192.